<?php

/**
 * GetSetting.class.php 获取文章详情
 * 
 *
 * @author     late.xiao@qq.com
 */
namespace System\Api;

use Base\Lib\Implement\Api;

class GetSettingApi implements Api {

    /**
     * @var string
     * */
    public $api_desc = '根据条件获取站点设置';
    public function getParams()
    {
        $params = array(
                'key'=>array('type'=>'int', 'valid'=>'required', 'default'=>'', 'title'=>'站点设置key')
        );
        
        return $params;
    }
    
    public function get($params)
    {
        $filter['s_key'] = $params['key'];
        $obj_serv = D('System/Setting', 'Service');
        
        return $obj_serv->getRow($filter);
    }

}
 
 